/**
 * Created by Administrator on 2016/10/28.
 */
window.onload=function(){
   var lis=$("#list li");
   var li1=$("#li1");
   var li2=$("#li2");
   var li3=$("#li3");
   var container=$("#container");
   var container1=$("#container1");
   var container2=$("#container2");

    li1[0].addEventListener('click',function(){
        lis.removeClass("active");
        li1.addClass("active");
        container.css({display:"block"});
        container1.css({display:"none"});
        container2.css({display:"none"});
    },false);
    li2[0].addEventListener('click',function(){
        lis.removeClass("active");
        li2.addClass("active");
        container.css({display:"none"});
        container1.css({display:"block"});
        container2.css({display:"none"});
    },false);
    li3[0].addEventListener('click',function(){
        lis.removeClass("active");
        li3.addClass("active");
        container.css({display:"none"});
        container1.css({display:"none"});
        container2.css({display:"block"});
        var mySwiper = new Swiper ('.swiper-container', {
            //direction: 'vertical', //默认就是水平
            loop: true,//无限循环
            //autoplay: 3000,//自动播放的时间间隔
            autoplayDisableOnInteraction: false,
            // 如果需要分页器
            pagination: '.swiper-pagination',
        })
    },false);
};